<include file="public/header_m"/>
<div class="am-cf admin-main">
    <include file="public/sidebar_m"/>
    <!-- content start -->
    <div class="admin-content">
        <div class="am-cf am-padding">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">编辑客户信息</strong>
            </div>
        </div>
        <div class="am-tabs am-margin" data-am-tabs>
            <div class="am-tabs-bd">
                <div class="am-tab-panel am-fade" id="tab2">
                    <form class="am-form" name="form1" id="form1" action="__URL__/userEdit2" method="post" onsubmit="return checkForm()">
                        <div class="am-margin-top">
                            <div class="am-u-sm-2 am-text-right">
                                姓名
                            </div>
                            <div class="am-u-sm-4 col-end">
                                <input type="text" class="am-input-sm" id="name" name="name" value="{$data.name}">
                            </div>
                        </div>
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-2 am-text-right">
                                手机
                            </div>
                            <div class="am-u-sm-4">
                                <input type="text" class="am-input-sm" id="phone" name="phone" value="{$data.phone}">
                            </div>
                        </div>
                        <div class=" am-margin-top">
                            <div class="am-u-sm-2 am-text-right">
                                地址
                            </div>
                            <div class="am-u-sm-4">
                                <input type="text" class="am-input-sm" id="address" name="address" value="{$data.address}">
                            </div>
                        </div>
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-2 am-text-right">
                                微信
                            </div>
                            <div class="am-u-sm-4">
                                <input type="text" class="am-input-sm" id="weixin" name="weixin" value="{$data.weixin}">
                            </div>
                        </div>
                        <div class="am-g am-margin-top">
                            <div class="am-u-sm-2 am-text-right">
                                备注
                            </div>
                            <div class="am-u-sm-5">
                                <textarea class="" rows="5" id="intro" name="intro">{$data.intro}</textarea>
                            </div>
                        </div>
                        <div class="am-g am-margin">
                            <input type="hidden"  name ="uid" value="{$data.uid}"/>
                            <input type="submit" name="" value="修改" class="am-btn am-btn-primary am-btn-sm am-fl">
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!-- content end -->

</div>
<script>
    function checkForm() {
        var addform = document.form1;
        if (addform.phone.value == "") {
            alert("请填写手机!");
            addform.tel.focus();   //用户名输入框获得焦点
            return false;   //不提交表单
        }
        else if (isNaN(addform.phone.value)) {
            alert("电话只能为数字!");
            addform.phone.focus();   //用户名输入框获得焦点
            return false;   //不提交表单
        }
        return true;
    }
</script>
<include file="public/footer_m"/>
